#include <stdio.h>
int main (int argc, char** argv) { int num, sum = 0; FILE* file;    if (argc == 1) { printf ("codeline [计数文件]\n"); return 1; }    if ((file = fopen (argv[1], "r")) == NULL) { printf ("打开失败！%s\n", argv[1]); return 1; }    while (fscanf (file, "%d", &num) != EOF) { sum += num; }    printf ("代码计数: %d 行\n", sum);    return 0; }
